#ifndef SLICE_H
#define SLICE_H

#ifndef FALLOC_H
# error must include falloc
#endif
#ifndef CORE_H
# include "..\..\..\Core\System\Core.h"
#endif
#include "SliceFractionCollection.hpp"

namespace System { namespace Scheduler {

	typedef struct
	{
	private:
		fallocContext* _fallocCtx;

	public:
		SliceFractionCollection Fractions;

        __device__ void xtor(fallocHeap* heap)
        {
			trace(Slice, "xtor");
			_fallocCtx = fallocCreateCtx(heap);
			Fractions.xtor(_fallocCtx);
        }
		__device__ void Dispose()
		{
			trace(Slice, "Dispose");
			fallocDisposeCtx(_fallocCtx);
		}

	} Slice;

}}

#endif // SLICE_H
